package com.koudai.finance.exception;

import com.koudai.finance.enums.ResultCode;
import lombok.Data;

/**
 * @Description: 自定义业务异常类
 * @author: ls
 * @date: 2020/7/14 20:34
 */
@Data
public class BusinessException extends RuntimeException {
    private Integer code;
    private String message;

    public BusinessException(ResultCode resultCode) {
        this.code = resultCode.getCode();
        this.message = resultCode.getMessage();
    }

    public BusinessException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
